import request from '@/utils/request'
////////////////////////////// 合同审批
export function submit(data) {
  return request({
    url: 'buss/mainlinecontract/submit',
    method: 'post',
    data
  })
}

export function resubmit(data) {
  return request({
    url: 'buss/mainlinecontract/resubmit',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'buss/mainlinecontract/delete',
    method: 'post',
    data: ids
  })
}

export function getOne(id) {
  return request.get('buss/mainlinecontract/getOne?id='+id)
}

export function getOneVO(id) {
  return request.get('buss/mainlinecontract/getOneVO?id='+id)
}

export function getTablePage(data) {
  return request.post('buss/mainlinecontract/paging', data)
}

export function getProjectSection(data,data2,data3) {
  return request.post('buss/mainlinecontract/getProjectSection?pid=' + data + '&id='+data2 + '&typeId='+data3)
}


export function getRelatedContractList(data,data2) {
  return request.post('buss/contract/getRelatedContractList?projectId=' + data + '&typeName='+data2 )
}


export function getScopeProjects(id) {
  return request.post('buss/mainlinecontract/getScopeProjects?id='+id)
}


export function getSecondPartUserTree(id) {
  return request.post('buss/contract/getSecondPartUserTree?cid='+id)
}


export function getConsortiumUnitNum() {
  return request.post('buss/mainlinecontract/getConsortiumUnitNum')
}

export default {
  submit,
  resubmit,
  getOne,
  getOneVO,
  del,
  getTablePage,
  getProjectSection,
  getRelatedContractList,
  getScopeProjects,
  getSecondPartUserTree,
  getConsortiumUnitNum,

}
